package edu.neusoft.springhtmldemo.service;

import edu.neusoft.springhtmldemo.domain.UserManagement;
import edu.neusoft.springhtmldemo.mapper.UserManagementMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserManagementService {
    @Autowired
    private UserManagementMapper mapper;

    public  Object login(UserManagement userManagement){
        return mapper.login(userManagement);
    }

    public List<UserManagement> userManagementshowAll() {
        return mapper.selectuserManagementAll();
    }

    public void addUserManagement(UserManagement userManagement) {
        mapper.addUserManagement(userManagement);
    }

    public void delUserManagement(Integer userId) {
        mapper.delUserManagement(userId);
    }

    public void updateUserManagement(UserManagement userManagement) {

        mapper.updateUserManagement(userManagement);
    }

    public List<UserManagement> selectUserByUserNameAndDept(String userName,String dept) {
        return mapper.selectUserByUserNameAndDept(userName,dept);
    }

    public UserManagement getUserByNameAndPwd(UserManagement userManagement) {
        return mapper.selectUserByNameAndPwd(userManagement);
    }
}
